<?php
class Apps_View_Helper_HtmlStripTag extends Zend_View_Helper_Abstract {
	public function htmlStripTag($html) {
        return preg_replace('/>/', '&gt;',
                   preg_replace('/</', '&lt;',
                       preg_replace('/<[^>]+>/', '', $html)));
    }

    public function htmlFormStripTag($html) {
    	$allowedTags = array('b','script','i','u');
    	$allowedAtrributes = array('');
    	$stripTags = new Zend_Filter_StripTags($allowedTags,$allowedAtrributes);
    	$purifiedHtml = $stripTags->filter($html);
    	return preg_replace('/<script/', '**hacked**', $purifiedHtml);
    }
}
